﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

/// <summary>
/// Summary description for WGMNetwork
/// </summary>
[Serializable]
public class WGMNetwork
{
    public string NetworkName { get; set; }
    public string NetworkPassword { get; set; }
    public string NetworkCreatedBy { get; set; }
    public bool IsPasswordProtected { get; set; }
    public string NetwordDescription { get; set; }
    public DateTime NetworkCreationDate { get; set; }
    public int NetworkMembersCount { get; set; }
    public bool IsRequesterAMember { get; set; }
	public WGMNetwork(string name, string password, string createdBy, string description)
	{
        NetworkName = name;
        NetworkPassword = password;
        NetwordDescription = description;
        NetworkCreatedBy = createdBy;

        NetworkCreationDate = DateTime.Now;
        if (WEncryption.WCryptor.Decrypt( NetworkPassword).Trim() == "")
            IsPasswordProtected = false;
        else
            IsPasswordProtected = true;
	}
    public WGMNetwork() { }
}
